<%-- 
    Document   : lista
    Created on : Mar 18, 2014, 7:20:47 PM
    Author     : silvio
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title>Listagem de Cargos</title>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/960.css" type="text/css" media="screen" charset="utf-8" />
        <!--<link rel="stylesheet" href="css/fluid.css" type="text/css" media="screen" charset="utf-8" />-->
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/template.css" type="text/css" media="screen" charset="utf-8" />
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/colour.css" type="text/css" media="screen" charset="utf-8" />        
        <script src="${pageContext.request.contextPath}/js/standard.js"></script>
    </head>
    <body>

        <h1 id="head">WEBFIS - Listagem de cargos</h1>

        <ul id="navigation">
            <li><span class="active">Overview</span></li>
            <li><a href="#">News</a></li>
            <li><a href="#">Users</a></li>
        </ul>

        <div id="content" class="container_16 clearfix">
            <form method="get" action="${pageContext.request.contextPath}/cargo/lista">
                <div class="grid_4">
                    <p>

                        <label>Cargo</label>
                        <input type="text" name="filtro" />

                    </p>

                </div>				
                <div class="grid_4">                    
                        <label>&nbsp;</label>
                        <input type="submit" value="Pesquisar" />                                      
                        <input type="button" value="Novo" onclick="goToUrl('${pageContext.request.contextPath}/cargo/novo');"/>                                         
                </div>

            </form> 
            <c:if test="${not empty mensagem}">
            <p class="mensagem">
            ${mensagem}
            </p>
            </c:if>
            <div class="grid_16">
<display:table id ="cargo" name="${cargoList}" pagesize="5" requestURI="/cargo/lista" defaultsort="2">
    
  <display:column property="idCargo" title="ID" style="width:5%"/>
  <display:column property="cargo" title="Cargo" style="width:75%"/>
  <display:column title="Editar" style="width:10%"><a href="${pageContext.request.contextPath}/cargo/${cargo.idCargo}" class="edit">Edit</a></display:column>  
  <display:column title="Apagar" style="width:10%">
      
      <form id="f${cargo.idCargo}" name="f${cargo.idCargo}" action="<c:url value="/cargo/${cargo.idCargo}"/>" method="POST">
          <input type="hidden" name="_method" value="DELETE">
          <a href="#" class="delete" onclick="confirmarDeletar('f${cargo.idCargo}');">Delete</a>
      </form>
  </display:column>  
 </display:table>
                
            </div>
        </div>

        <div id="foot">


        </div>
    </body>
</html>
